package com.xiaoshuidi.cloud.module.contract.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description:
 * @author: zhaoyu
 * @date: 2023/6/28
 */
@Getter
@AllArgsConstructor
public enum ApproveTypeEnum {
    //新签
    CONTRACT(0, "contract"),
    //续租
    RENEWAL_CONTRACT(1, "renewalContract"),
    //换房
    EXCHANGE_CONTRACT(2, "exchangeContract"),
    //退租
    RENTING_OUT_CONTRACT(3, "rentingOutContract"),
    //账单
    ORDER(4, "order"),
    //企业合同审批
    COMPANY_CONTRACT(5, "companyContract"),
    //企业续租审批
    RENEWAL_COMPANY_CONTRACT(6, "renewalCompanContract"),
    //企业退租审批
    RENTING_OUT_COMPANY_CONTRACT(7, "rentingOutCompanyContract"),
    //优惠券
    COUPON(8, "coupon"),
    // 业主合同
    OWNER_CONTRACT(9, "ownerContract"),
    //企业续租审批
    RENEWAL_COMPANY_CONTRACT_BATCH(10, "renewalCompanContractBatch"),
    BALANCE_WITHDRAWAL(11, "balanceWithdrawal"),
    //个人钱包提现
    PERSONAL_WALLET_WITHDRAWAL(12, "personalWalletWithdrawal"),
    //企业钱包提现
    COMPANY_WALLET_WITHDRAWAL(13, "companyWalletWithdrawal"),

    //业主打款审批
    PAYMENT_BY_THE_OWNER(14, "paymentByTheOwner"),

    //业主退租审批
    HOUSE_OWNER_RENTING_OUT(15, "houseOwnerRentingOut"),
    // 业主合同续租
    RENEWAL_OWNER_CONTRACT(16, "renewalOwnerContract"),
    //租赁换租
    CHANGE_CONTRACT_ROOM(17, "changeContractRoom"),
    //冲调审批
    READJUST_ORDER_FEE(18, "readjustOrderFee"),
    ;
    //编码
    private final Integer code;
    //信息
    private final String msg;

    public static ApproveTypeEnum getByCode(Integer code) {
        for (ApproveTypeEnum e : ApproveTypeEnum.values()) {
            if (e.code.equals(code)) {
                return e;
            }
        }
        return null;
    }
}
